package com.service.Impl;

import com.dao.BooksMapper;
import com.pojo.Books;
import com.service.BooksService;

import java.util.List;

public class BooksServiceImpl implements BooksService {

    private BooksMapper booksMapper;

    public void setBooksMapper(BooksMapper booksMapper) {
        this.booksMapper = booksMapper;
    }

    public void addBooks(Books book) {
        booksMapper.addBooks(book);
    }

    public void delBooks(int id) {
        booksMapper.delBooks(id);
    }

    public void updBooks(Books book) {
        booksMapper.updBooks(book);
    }

    public Books selBooks(int id) {
        return booksMapper.selBooks(id);
    }

    public List<Books> selAllBooks() {
        return booksMapper.selAllBooks();
    }

    public List<Books> selBookByName(String bookName) {
        return booksMapper.selBooksByName(bookName);
    }
}
